/**
 * 
 */

var bt_guest_book_input, bt_guest_book_del, bt_guest_book_gomian;

function guest_book_init() {
	general();
	
}

function general() {
	
	url= "index.jsp?inc=./guest_book/"
	
	bt_guest_book_gomian = document.getElementById('bt_guest_book_gomian');
	if(bt_guest_book_gomian != null){
		bt_guest_book_gomian.onclick = function(){
		var frm_gomian = document.hidden_guest_book_frm;
		bt_guest_book_gomian.action = "index.jsp"; 
		frm_gomain.submit();
		}
	}
	
	bt_guest_book_input = document.getElementById('bt_guest_book_input');
	if(bt_guest_book_input != null){
		bt_guest_book_input.onclick = function(){
			
			var frm_input = document.hidden_guest_book_frm;
			frm_input.action = "index.jsp?page_set=./guest_book/guest_book_input.jsp";
			frm_input.submit(); 
		}
	}
	
	bt_guest_book_del = document.getElementById('bt_guest_book_del');
	if(bt_guest_book_del != null){
		bt_guest_book_del.onclick = function(){
			var b = confirm("정말 삭제하시겠습니까?");
			alert(b);
			var frm_del = document.hidden_guest_book_frm;
			if(b){
				frm_del.action = "index.jsp?page_set=./guest_book/guest_book_del.jsp";
				frm_del.submit();
				b = false;
				
			}else{
				alert("삭제가 취소되었습니다.");
			}
		}
	}
	
	
	function goPage(page)
	{
		alert("고고");
		var mf = document.hidden_guest_book_frm;
		mf.now_page.value = page;
		mf.m_id.value = m_id;
		mf.action = "index.jsp?page_set=./guest_book.jsp";
		mf.submit();

//		location.href = url+'view.jsp&page=' + page;
	}
	
	function go_guest() {
		var mf = document.hidden_guest_book_frm;
		mf.now_page.value = page;
		mf.m_id.value = m_id;
		mf.action = "index.jsp?page_set=./guest_book.jsp";
		mf.submit();
		
	}
	
	
}